// 匹配规则
const rules = {
  username: [{ required: true, trigger: 'blur', message: '请输入用户名' }],
  password: [{ required: true, trigger: 'blur', message: '请输入密码' }],
  sex: [{ required: true, message: '请选择性别', trigger: 'change' }],
  phone: [{ message: '请选择日期', trigger: 'blur' }],
  email: [
    { message: '请输入邮箱地址', trigger: 'blur' },
    {
      type: 'email',
      message: '请输入正确的邮箱地址',
      trigger: ['blur', 'change'],
    },
  ],
  birth: [
    { required: true, type: 'date', message: '请选择日期', trigger: 'change' },
  ],
  introduction: [{ message: '请输入介绍', trigger: 'blur' }],
  location: [{ message: '请输入地区', trigger: 'change' }],
};

export default rules;
